/*
*************************************
* PocketGTT
*************************************
This file is part of PocketGTT.

PocketGTT is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

PocketGTT is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with PocketGTT.  If not, see <http://www.gnu.org/licenses/>.
*/

import QtQuick 1.0

Rectangle {
    //    width: 360
    //    height: 360

    // set size to screen
    anchors.fill: parent
    anchors.centerIn: parent
    id: pageview_loading

    color: myWin.theme.passaggiview_loading_background

    Text {
        text: qsTr("Loading")
        anchors.centerIn: parent
        font.pixelSize: parent.height/15
        color: myWin.theme.passaggiview_loading_text_color

    }

    MouseArea {
        anchors.fill: parent
        onClicked: {
            //myWin.statesMan.aboutview_active = !myWin.statesMan.aboutview_active
            myWin.statesMan.pageview_loading = false
        }
    }
    states: [
        State {
            name: "active"
            when: myWin.statesMan.pageview_loading
            PropertyChanges { target: pageview_loading; opacity: 1}
            PropertyChanges { target: pageview_loading; focus: 1}
        },
        State {
            name: "hidden"
            when: !myWin.statesMan.pageview_loading
            PropertyChanges { target: pageview_loading; opacity: 0}
            PropertyChanges { target: pageview_loading; focus: 0}
        }
    ]
    transitions: [
        Transition {
            NumberAnimation { properties: "opacity"; duration: 300}
        }
    ]
}
